package cho114366.basic;

import java.util.Scanner;

public class J03_26_teacher {

	public static void main(String[] args) {
		
		Scanner sc=null;
		
		String isMarried=""; 
		int Married; //결혼여부
		int salary; //연봉
		int tax=0; 	//세금
		sc = new Scanner(System.in);
		
		System.out.println("결혼여부? (미혼:0,N/기혼1,Y)");
		//표현식에서 문자열 비교는 == 연산자로
		// 할 수 없음, 문자열은 객체object형이기 때문
//		isMarried = sc.next();
		Married = sc.nextInt();
		System.out.println("연봉은?");
		salary = sc.nextInt();
		if(Married == 0){ // 미혼이라며
			if(salary < 3000)
				tax = (int)(salary*0.1); //연봉 10%
			else
				tax = (int)(salary*0.25);//연봉 25%
			isMarried = "미혼";
		}else if(Married==1){//기혼이라면
			if(salary<6000)
				tax=(int)(salary*0.15);
			else
				tax=(int)(salary*0.35);
			isMarried = "기혼";
		}
		
		System.out.println("결혼여부:"+isMarried);
		System.out.println("연봉:"+salary);
		System.out.println("세금:"+tax);
		
		sc.close();
//		if(isMarried =="미혼")
//			
//		System.out.println("미혼");
//		
//		else if(isMarried =="기혼");
//		
//		System.out.println("기혼!");
	}
}


